#pragma once
#include <iostream>

class date
{
public:
	date(int year, int month, int day)
	{
		_year = year;
		_month = month;
		_day = day;
	}
	int GetMonthDay()
	{
		int days[] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
		if ((_month == 2) && ((_year % 4 == 0 && _year % 100 != 0) || (_year % 400 == 0)))
		{
			return 29;
		}
		else
		{
			return days[_month];
		}
	}

	void print()
	{
		std::cout << _year << "-" << _month << "-" << _day << std::endl;
	}

//	bool CheckDate(int year,int month,int day);

	bool operator<(const date& d);
	bool operator==(const date& d);
	bool operator!=(const date& d);
	bool operator>=(const date& d);

	date& operator+=(int day);
	date operator+(int day);

	date& operator-=(int day);
	date operator-(int day);

	int operator-(const date& d);




private:
	int _year;
	int _month;
	int _day;
};